e9f53c
@@ -720,7 +720,14 @@
public class UriComponentsBuilder {
 			if (this.path.length() == 0) {
 				return null;
 			}
-			String path = this.path.toString().replace("//", "/");
+			String path = this.path.toString();
+			while (true) {
+				int index = path.indexOf("//");
+				if (index == -1) {
+					break;
+				}
+				path = path.substring(0, index) + path.substring(index + 1);
+			}
 			return new HierarchicalUriComponents.FullPathComponent(path);
 		}
 
